<?php

namespace app\admin\controller\vpay;

use app\common\controller\Backend;
use think\facade\Cache;
use app\api\service\VpayService;
class Client extends Backend
{
    public function index(): void
    {
        $vpay = new VpayService();
        $data = [];
        $data['secret_key'] = get_sys_config('secret_key', 'vpay');
        $data['heartbeat_time'] = $vpay->getHeartbeat();
        $data['is_valid'] = $vpay->validateHeartbeat();
        $data['host'] = url('/', [], false, true)->build();
        $this->success('获取成功', $data);   
    }
}